<extend name="template/base_index" />


<block name="area_header">
	<style type="text/css">
		.m-avatar{
			width: 40px;
			height: 40px;
			border-radius: 50%;
		}
	</style>
</block>

<block name="area_body">
	{:W('Menus/topbar')}
	<div class="admin-main container-fluid">
		{:W('Menus/left')}
		<div class="admin-main-content">
			{:W('Menus/breadcrumb')}
		<div class="table-responsive well">
			<!-- 过滤\查询按钮 -->
			<div class="filter-controls">
				<form action="{:U('Member/index')}" class="memberForm form-inline" method="post">
					<div class="form-group">
						<label class="control-label">用户昵称/UID/手机号码</label>
						<div class="input-group">
							<input class="form-control" value="{$nickname}" type="text" name="nickname"  placeholder="请输入用户昵称/UID/手机号码" />
						</div>
					</div>
					<!--<div class="form-group">-->
						<!--<label class="control-label">手机号</label>-->
						<!--<div class="input-group">-->
							<!--<input class="form-control" value="{$mobile}" type="text" name="mobile" placeholder="请输入用户手机号" />-->
						<!--</div>-->
					<!--</div>-->
					<div class="form-group">
						<label class="control-label">用户所属组</label>
						<div class="input-group">
							<select name="u_group" class="form-control">
								<option value="">=全部=</option>
								<volist name="user_group" id="vo">
								<neq name="vo['id']" value="1">
								<option <eq name="vo.id" value="$u_group">selected="selected"</eq> value="{$vo.id}">{$vo.title}</option>
								</neq>
								</volist>
							</select>
						</div>
					</div>
					<div class="form-group">
						<label class="control-label">&nbsp;</label>
						<div class="input-group">
							<button type="submit" class="btn btn-primary btn-sm"><i class="fa fa-search"></i>查询</button>
						</div>
					</div>
				</form>
			</div>
			<!-- 操作按钮 -->
			<div class="btn-controls">
				<a class="btn btn-sm btn-primary" href="{:U('Member/add')}"><i class="fa fa-plus"></i>{:L('BTN_ADD')}</a>
				<!--<a target-form="selectitem" class="ajax-post btn btn-sm btn-primary" href="{:U('Member/enable')}"><i class="fa fa-check-circle"></i>{:L('BTN_ENABLE')}</a>-->
				<!--<a target-form="selectitem" class="ajax-post btn btn-sm btn-primary" href="{:U('Member/disable')}"><i class="fa fa-minus-circle"></i>{:L('BTN_DISABLE')}</a>-->
			</div>

			<table class="table table-striped table table-hover  table-condensed">
				<thead>
				<tr>
					<th style="width:40px;">
						<input type="checkbox" class="selectall" onclick="myUtils.selectall(this,'.selectitem');" />
					</th>
					<th>
						用户唯一ID
					</th>
					<th>
						头像/昵称
					</th>
					<th width="120px" style="width: 120px;">
						登录用户名
					</th>
					<th>
						手机号
					</th>
					<th>
						注册时间
					</th>
					<th>
						状态
					</th>
					<th>
						{:L('OPERATOR')}
					</th>
				</tr>
				</thead>
				<tbody>
				<empty name="list">
				<tr>
					<td colspan="8" class="text-center">{:L('NO_DATA')}</td>
				</tr>
				<else/>
				<volist name="list" id="vo">
				<tr>
					<td>
						<input type="checkbox" value="{$vo.id}" name="uids[]" class="selectitem" /></td>

					<td>
						{$vo.id}</td>
					<td>
						<a href="{:U('Member/view',array('id'=>$vo['id']))}">
							<img class="m-avatar" src="{:getAvatarUrl($vo['id'],60)}" />
							{$vo.nickname|default='--'}
						</a>
					</td>
					<td style="width: 120px;word-break: break-all;">{$vo.username}</td>
					<td style="width: 120px;word-break: break-all;	" >{$vo.mobile}</td>
					<td >{:date("Y-m-d H:i:s",$vo['reg_time'])}</td>

					<td>{$vo.status|getStatus}</td>
					<td>
						<a target="_blank" href="http://api.guannan.8raw.com/public/web.php/Alibaichuan/im?uid={:UID}&touid={$vo['id']}">在线联系</a>
						<!--<eq name="vo.status" value="1">-->
						<!--<a href="{:U(CONTROLLER_NAME .'/disable',array('id'=>$vo['id']))}" class="btn btn-danger btn-sm ajax-get" ><i class="fa fa-minus-circle"></i> {:L('BTN_DISABLE')}</a>-->
						<!--<else/>-->
						<!--<a href="{:U(CONTROLLER_NAME .'/enable',array('id'=>$vo['id']))}" class="btn btn-danger btn-sm ajax-get" ><i class="fa fa-minus-circle"></i> {:L('BTN_ENABLE')}</a>-->
						<!--</eq>-->
					</td>
				</tr>
				</volist>
				</empty>

				</tbody>
			</table>
			<div>{$show}</div>
		</div>
	</div>
	<!-- END admin-main-content -->

</div>
<!-- END admin-main-->

</block>

<block name="area_footer">

</block>
